package com.lottery.material.service.portal.transaction;

import com.lottery.material.pojo.transaction.TransactionRecord;
import com.lottery.material.vo.portal.transaction.TradeRecordStatisticsVo;

import java.util.List;
import java.util.Map;

/**
 * Description:    交易记录服务接口
 * Author:         sunny
 * CreateDate:     2019-04-17 11:08
 */
public interface TransactionRecordService {

    /**
     * description: 根据对象参数查询记录数
     * author sunny
     * createDate 2019-04-17 上午 11:11
     * @param transactionRecord
     * @return
     */
    Integer findCountByObject(TransactionRecord transactionRecord);

    TradeRecordStatisticsVo findTradeRecordStatistics(Map<String, String> reqParamMap);

    /**
     * description: 根据交易类型编号和文章id统计次数和总额
     * author sunny
     * createDate 2019-04-24 上午 9:50
     * @param transactionTypeCode
     * @param articleId
     * @return
     */
    Map<String, Object> findByTypeCodeAndArticleId(String transactionTypeCode, String articleId);

    /**
     * description: 根据文章id分页查询付款查看文章明细
     * author sunny
     * createDate 2019-04-26 上午 11:29
     * @param paramMap
     * @return
     */
    List<Map<String, Object>> findPaymentDetailByArticleId(Map<String, Object> paramMap);

    /**
     * description: 根据文章id分页查询打赏文章明细
     * author sunny
     * createDate 2019-04-26 下午 1:40
     * @param paramMap
     * @return
     */
    List<Map<String, Object>> findRewardDetailByArticleId(Map<String, Object> paramMap);

    /**
     * description: 根据用户id和文章id查询查看文章记录
     * author sunny
     * createDate 2019-04-24 下午 8:38
     * @param userId
     * @param articleId
     * @return
     */
    TransactionRecord findViewArticleByUserIdAndArticleId(String userId, String articleId);
}
